package com.changgou.comment.pojo;

import java.io.Serializable;
import java.util.Date;

public class Comment implements Serializable {
    private Long id;

    private String skuId;

    //根据spuId查询评论
    private String spuId;

    //评论内容
    private String content;

    //评论的用户名
    private String username;

    //是否匿名  1为匿名评论 0为不匿名 默认匿名
    private String anonymityType="1";

    //评论图片的url
    private String[] url;

    //评论时间
    private Date date;

    //sku名
    private String skuName;

    //商品分数 0.0-5.0
    private Double score;
    //商品符合分数
    private Double conformScore;
    //店家服务分数
    private Double serviceScore;
    //物流发货分数
    private Double deliveryScore;
    //配送员分数
    private Double distributionScore ;
    //追加评论
    private String additionalComments;
    //评论类型
    private String commentType;
    //是否删除 1表示删除  0表示未删除
    private String isDelete;

    public Double getConformScore() {
        return conformScore;
    }

    public void setConformScore(Double conformScore) {
        //防止前端有问题
        if (conformScore>=5.0){
            conformScore=5.0;
        }
        if (conformScore<0.0){
            conformScore=0.0;
        }
        this.conformScore = conformScore;
    }

    public Double getServiceScore() {
        return serviceScore;
    }

    public void setServiceScore(Double serviceScore) {
        //防止前端有问题
        if (serviceScore>=5.0){
            serviceScore=5.0;
        }
        if (serviceScore<0.0){
            serviceScore=0.0;
        }
        this.serviceScore = serviceScore;
    }

    public Double getDeliveryScore() {
        return deliveryScore;
    }

    public void setDeliveryScore(Double deliveryScore) {
        //防止前端有问题
        if (deliveryScore>=5.0){
            deliveryScore=5.0;
        }
        if (deliveryScore<0.0){
            deliveryScore=0.0;
        }
        this.deliveryScore = deliveryScore;
    }

    public Double getDistributionScore() {
        return distributionScore;
    }

    public void setDistributionScore(Double distributionScore) {
        //防止前端有问题
        if (distributionScore>=5.0){
            distributionScore=5.0;
        }
        if (distributionScore<0.0){
            distributionScore=0.0;
        }
        this.distributionScore = distributionScore;
    }

    public String getIsDelete() {
        return isDelete;
    }

    public void setIsDelete(String isDelete) {
        this.isDelete = isDelete;
    }

    public String getAnonymityType() {
        return anonymityType;
    }

    public void setAnonymityType(String anonymityType) {
        this.anonymityType = anonymityType;
    }

    public String getCommentType() {
        return commentType;
    }

    public void setCommentType(String commentType) {
        this.commentType = commentType;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getSkuId() {
        return skuId;
    }

    public void setSkuId(String skuId) {
        this.skuId = skuId;
    }

    public String getSpuId() {
        return spuId;
    }

    public void setSpuId(String spuId) {
        this.spuId = spuId;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }
    
    public String[] getUrl() {
        return url;
    }

    public void setUrl(String[] url) {
        this.url = url;
    }

    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }

    public String getSkuName() {
        return skuName;
    }

    public void setSkuName(String skuName) {
        this.skuName = skuName;
    }

    public Double getScore() {
        return score;
    }

    public void setScore(Double score) {
        //防止前端有问题
        if (score>=5.0){
            score=5.0;
        }
        if (score<0.0){
            score=0.0;
        }
        this.score = score;
    }

    public String getAdditionalComments() {
        return additionalComments;
    }

    public void setAdditionalComments(String additionalComments) {
        this.additionalComments = additionalComments;
    }

}
